<template>
  <div>
    <h4>{{ obj.name }}--{{obj.age}}</h4>
    <button @click="fun()">点我添加新内容</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      obj: {
        name: "set",
      },
    }
  },
    methods:{
        fun(){
            this.$set(this.obj,"age",18)
            console.log("age",this.obj.age)
        }
    }
  
};
</script>

<style>
</style>